home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F43156_testImprovedIntegration2.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-10-31  |  1.9 KB  |  58 lines

  1. <xsl:stylesheet version="1.0"
  2.  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:IntegralFunction="IntegralFunction"
  4. xmlns:IntegralFunction2="IntegralFunction2"
  5. xmlns:IntegralFunction3="IntegralFunction3"
  6. xmlns:IntegralFunction4="IntegralFunction4"
  7.  exclude-result-prefixes="xsl IntegralFunction IntegralFunction2
  8.  IntegralFunction3 IntegralFunction4"
  9. >
  10.  
  11.   <xsl:import href="improvedIntegration.xsl"/>
  12.  
  13.   <xsl:output indent="yes" omit-xml-declaration="yes"/>
  14.  
  15.   <IntegralFunction:IntegralFunction/>
  16.   <IntegralFunction2:IntegralFunction2/>
  17.   <IntegralFunction3:IntegralFunction3/>
  18.   <IntegralFunction4:IntegralFunction4/>
  19.  
  20.   <xsl:template match="/">
  21.     <xsl:text> </xsl:text>
  22.     <xsl:variable name="vMyFun4" select="document('')/*/IntegralFunction4:*[1]"/>
  23.     <xsl:call-template name="improvedIntegration">
  24.       <xsl:with-param name="pFun" select="$vMyFun4"/>
  25.       <xsl:with-param name="pA" select="1"/>
  26.       <xsl:with-param name="pB" select="2"/>
  27.       <xsl:with-param name="pEpsRough" select="0.001"/>
  28.       <xsl:with-param name="pEpsImproved" select="0.01"/>
  29.     </xsl:call-template>
  30.  
  31.  
  32.   </xsl:template>
  33.  
  34.   <xsl:template name="myIntegralFn" match="*[namespace-uri()='IntegralFunction']">
  35.     <xsl:param name="pX"/>
  36.  
  37.     <xsl:value-of select="$pX * $pX"/>
  38.   </xsl:template>
  39.  
  40.   <xsl:template name="myIntegralFn2" match="*[namespace-uri()='IntegralFunction2']">
  41.     <xsl:param name="pX"/>
  42.  
  43.     <xsl:value-of select="$pX * $pX * $pX"/>
  44.   </xsl:template>
  45.  
  46.   <xsl:template name="myIntegralFn3" match="*[namespace-uri()='IntegralFunction3']">
  47.     <xsl:param name="pX"/>
  48.  
  49.     <xsl:value-of select="4 div (1 + $pX * $pX)"/>
  50.   </xsl:template>
  51.  
  52.   <xsl:template name="myIntegralFn4" match="*[namespace-uri()='IntegralFunction4']">
  53.     <xsl:param name="pX"/>
  54.  
  55.     <xsl:value-of select="1 div $pX"/>
  56.   </xsl:template>
  57.  
  58. </xsl:stylesheet>